package cool.taomu.toolkit.quartz

import com.google.inject.AbstractModule
import cool.taomu.toolkit.Taomu
import cool.taomu.toolkit.platform.inter.CreateChildInjector

class QuartzTest {

    @ScheduledJob(cron="0/5 * * * * ?")
    def void a() {
        println("Hello Quartz")
    }

   	@CreateChildInjector  
    static class AMoulde extends AbstractModule{
    	override configure(){
        		bind(QuartzTest)
        }
    }

    def static void main(String[] arg) {
    							
        var inj = Taomu.run().createChildInjector(new AMoulde)
        var qt = inj.getInstance(QuartzTest);
        qt.a
    }
}
